//TESH.scrollpos=1
//TESH.alwaysfold=0
// 设置单位 生命上限 速度
function ST_set_monster_hp_speed takes unit monster, real max_hp, real speed returns nothing
    call SetUnitState( monster, UNIT_STATE_MAX_LIFE, max_hp)
    call SetUnitState( monster, UNIT_STATE_LIFE, max_hp)
    call SetUnitMoveSpeed( monster, speed )
endfunction
// 指定点刷出怪物并设置属性
function ST_monster_spown takes integer monsterId,player monster_owner,location spown_position,real max_hp,real speed returns nothing
    call CreateNUnitsAtLoc(1, monsterId, monster_owner, spown_position, bj_UNIT_FACING)
    call ST_set_monster_hp_speed(GetLastCreatedUnit(), max_hp, speed)
endfunction

globals
    location LAYABLE_MAP_POINT
endglobals

function ST_init takes nothing returns nothing
    set udg_START_RECT_ARRAY[0] = gg_rct_start1
    set udg_START_RECT_ARRAY[1] = gg_rct_start2
    set udg_START_RECT_ARRAY[2] = gg_rct_start3
    set udg_START_RECT_ARRAY[3] = gg_rct_start4
    set udg_START_POINT_ARRAY[0] = GetRectCenter(gg_rct_start1)
    set udg_START_POINT_ARRAY[1] = GetRectCenter(gg_rct_start2)
    set udg_START_POINT_ARRAY[2] = GetRectCenter(gg_rct_start3)
    set udg_START_POINT_ARRAY[3] = GetRectCenter(gg_rct_start4)
    set LAYABLE_MAP_POINT = GetRectCenter(GetPlayableMapRect())
endfunction
